Save actvie Ole picture with Paint to the tempfile in Windows.

Hi, I open a ole object. But I want to save it:

Object obj = current

print title column 0
print ":\n"
print title column 1

oleActivate (obj, column 1, 0)

And paint.exe is open. Now how to save it to temp.bmp in the tem Windows folder?

I see that I can use system(command) but can not find a way to do it. I can not find how to save it

C:\Windows\System32\mspaint.exe is the exe put how to tell him to save the picture? And what about there is no default program which can open the file. How to save this OLE object?

 

 

 

 


Dinio - Mon Feb 01 11:16:29 EST 2016

Re: Save actvie Ole picture with Paint to the tempfile in Windows.
Mathias Mamsch - Tue Feb 02 02:13:27 EST 2016

Why would you not use the preview picture and save that?

With OLE there is no generic save method - dependent on the application you would need to use the application specific API to save the file, e.g. if you activate a Word document, you would need to call "Document.saveAs()" over the COM API. I am not sure though, that Paint has a public API for saving the picture. 

Regards, Mathias